package com.xbdun.web.validatebmp.frame.gateway;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.xbdun.common.api.XbdUnObjectResult;
import com.xbdun.common.enums.XbdunPkgEnum;
import com.xbdun.common.exceptions.BizException;

/**
 * 公共接口
 * @author <a href="zhanggt@cstonline.com">张国涛</a>
 * @createTime 2016年4月29日 下午5:18:59
 */
public interface IBaseWayService<T>{

	/**
	 * 基类验证方法
	 * @author ZHANGGUOTAO
	 * @param requst
	 * @param response
	 * @param commReqeust
	 * @param reallyObject
	 * @return
	 * @throws BaseRunTimeException
	 */
	public XbdUnObjectResult execute(HttpServletRequest requst,HttpServletResponse response,BaseMacRequest macRequest,Object reallyObject)throws BizException;
	
	/**
	 * 签名时候需要忽略的参数
	 * @author ZHANGGUOTAO
	 * @return
	 */
	public String[] getIgnores();
	/**
	 * 参数验证
	 * @author ZHANGGUOTAO
	 * @param model
	 * @return
	 */
	public void doValidate(final T model,final StringBuilder refMsg);
	
	/**
	 * 业务逻辑
	 * @author ZHANGGUOTAO
	 * @param requst
	 * @param response
	 * @param model
	 * @param secretKeyInfo
	 * @return
	 * @throws BaseRunTimeException
	 */
	public XbdUnObjectResult doProcess(final HttpServletRequest requst,final HttpServletResponse response,final T model,final XbdunPkgEnum xbdunPkgEnum)throws BizException;
}
